/**
 * Created by zhang on 4/27/2017.
 */
var fs = require('fs');

function copySmallFile(src, dst) {
    fs.writeFileSync(dst, fs.readFileSync(src));
}

copySmallFile('C:\\Program Files\\JetBrains\\WebStorm 2017.1.1\\bin\\webstorm64.exe', 'C:\\Users\\zhang\\Desktop\\web.exe');

function copyBigFile(src, dst) {
    fs.createReadStream(src).pipe(fs.createWriteStream(dst));
}

copyBigFile('C:\\Program Files\\JetBrains\\WebStorm 2017.1.1\\bin\\webstorm64.exe', 'C:\\Users\\zhang\\Desktop\\web.exe');